<div class="product-box">
	<h3>Lịch sử đơn hàng</h3>
<?php
	echo $session->flash();
?>
<div style="margin-top:20px">
<div id="table">
		<p class="title">
			<span class="col1"> <?php echo __('Code', true); ?> </span>
			<span class="col2"> <?php echo __('Ngày', true); ?> </span>
			<span class="col2"> <?php echo __('TT đặt hàng', true); ?> </span>
			<span class="col2"> <?php echo __('TT giao hàng', true); ?> </span>
			<span class="col2"> <?php echo __('Tình trạng', true); ?></span>
			<span class="col3"> <?php echo __('Xem chi tiết', true); ?></span>
			<br clear="all" />
		</p>
		<?php foreach($orders as $item) { ?>
		<p>
			<span class="col1"> <?php echo $item['Order']['id']; ?> </span>
			<span class="col2"> <?php echo $item['Order']['date']; ?> </span>
			<span class="col2">
				<?php
					echo $item['Order']['bill_name'];
					echo "<br/>";
					echo $item['Order']['bill_address'];
					echo "<br/>";
					echo $item['Order']['bill_phone'];
				?>
			</span>
			<span class="col2">
				<?php
					echo $item['Order']['delivery_name'];
					echo "<br/>";
					echo $item['Order']['delivery_address'];
					echo "<br/>";
					echo $item['Order']['delivery_phone'];
				?>
			</span>
			<span class="col2">
				<?php
					echo ($item['Order']['status']? "Cập nhật" : "Chờ xác nhận");
				?>
			</span>
			<span class="col3">
				<?php
					echo $html->link('Chi tiết',array('action'=> 'detail',$item['Order']['id']));
				?>
			</span>
			<br clear="all" />
		</p>
		<?php } ?>
	</div>
	<div class="cleaner"></div>
</div>